<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>YmsgIRC: network.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">YmsgIRC
   </div>
   <div id="projectbrief">Program enabling YMSG clients to use IRC</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('network_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">network.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Provides a base for an Instant Messaging network implementation.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="common_8h.html">common.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="sockets__cross_8h.html">sockets_cross.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="channel_8h.html">channel.h</a>&quot;</code><br/>
<code>#include &lt;queue&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for network.h:</div>
<div class="dyncontent">
<div class="center"><img src="network_8h__incl.jpg" border="0" usemap="#network_8h" alt=""/></div>
<map name="network_8h" id="network_8h">
<area shape="rect" id="node3" href="common_8h.html" title="Commonly used functions and debugging." alt="" coords="345,155,428,181"/><area shape="rect" id="node21" href="sockets__cross_8h.html" title="..." alt="" coords="533,80,651,107"/><area shape="rect" id="node26" href="channel_8h.html" title="A channel/chatroom implementation." alt="" coords="430,80,508,107"/><area shape="rect" id="node19" href="_chat_renderer_8h.html" title="Yahoo&#45;chat text&#45;formatting functions." alt="" coords="545,229,657,256"/></map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="network_8h__dep__incl.jpg" border="0" usemap="#network_8hdep" alt=""/></div>
<map name="network_8hdep" id="network_8hdep">
<area shape="rect" id="node3" href="_i_r_c_8h.html" title="Classes and functions useful for using Internet Relay Chat." alt="" coords="17,80,71,107"/></map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a08f5af08a2fd4c1a355c767b481edd21"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08f5af08a2fd4c1a355c767b481edd21"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8h.html#a08f5af08a2fd4c1a355c767b481edd21">NW_RESERVED_USERNAME</a>&#160;&#160;&#160;&quot;YmsgIRC&quot;</td></tr>
<tr class="memdesc:a08f5af08a2fd4c1a355c767b481edd21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reserved username for user-program interaction. <br/></td></tr>
<tr class="memitem:ac68aec1fe15437a8128dc1e09a813d65"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac68aec1fe15437a8128dc1e09a813d65"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NW_RESERVED_CHANPREFIX</b>&#160;&#160;&#160;'#'</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a279ec4e071bf0348bb79fefdc92d47ac"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8h.html#a279ec4e071bf0348bb79fefdc92d47ac">NwStepState</a> { <a class="el" href="network_8h.html#a279ec4e071bf0348bb79fefdc92d47aca559488ca041de038e4ee3d9ea163193a">NW_STEP</a>, 
<a class="el" href="network_8h.html#a279ec4e071bf0348bb79fefdc92d47aca663f9d86c7a32ab331d23777358923c7">NW_STEP_BEGIN</a>, 
<a class="el" href="network_8h.html#a279ec4e071bf0348bb79fefdc92d47acaa936952f0b9fab13f9d070774f2fff3e">NW_STEP_END</a>
 }</td></tr>
<tr class="memdesc:a279ec4e071bf0348bb79fefdc92d47ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Program states for use with NwNetwork::step()  <a href="network_8h.html#a279ec4e071bf0348bb79fefdc92d47ac">More...</a><br/></td></tr>
<tr class="memitem:aa389fb54708d93734fec717fe3c1e082"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><b>NwBlockState</b> { <b>NW_BLOCKED_UNKNOWN</b>, 
<b>NW_UNBLOCKED</b>, 
<b>NW_BLOCKED</b>
 }</td></tr>
<tr class="memitem:a693b956d9a9c59c9f23203ab93478556"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8h.html#a693b956d9a9c59c9f23203ab93478556">NwCheckType</a> { <br/>
&#160;&#160;<a class="el" href="network_8h.html#a693b956d9a9c59c9f23203ab93478556a1a5c92a9cdd9fabd3505568920f2bc9e">NW_CHECK_INVALID</a>, 
<a class="el" href="network_8h.html#a693b956d9a9c59c9f23203ab93478556a236ec7be6febe786f13e278984b95bd3">NW_CHECK_UNKNOWN</a>, 
<a class="el" href="network_8h.html#a693b956d9a9c59c9f23203ab93478556adae6e70f769dbce219c33c3bf2c60aa6">NW_CHECK_USERNAME</a>, 
<a class="el" href="network_8h.html#a693b956d9a9c59c9f23203ab93478556ad90a2ad51fd295e1b9d4372efef45fe3">NW_CHECK_CHANNEL</a>, 
<br/>
&#160;&#160;<a class="el" href="network_8h.html#a693b956d9a9c59c9f23203ab93478556a849f204369f6d309d9cf201425c56d8b">NW_CHECK_CHANNEL_UNKNOWN</a>, 
<a class="el" href="network_8h.html#a693b956d9a9c59c9f23203ab93478556a609d10ec9777a187f6e02f29b4afca54">NW_CHECK_RESERVED</a>, 
<a class="el" href="network_8h.html#a693b956d9a9c59c9f23203ab93478556a553f532188659511feaabf871114d04d">NW_CHECK_BLANK</a>
<br/>
 }</td></tr>
<tr class="memdesc:a693b956d9a9c59c9f23203ab93478556"><td class="mdescLeft">&#160;</td><td class="mdescRight">Name type distinctions.  <a href="network_8h.html#a693b956d9a9c59c9f23203ab93478556">More...</a><br/></td></tr>
<tr class="memitem:a7c7ec5e51e51ee0ffaa2a0f302775cf5"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8h.html#a7c7ec5e51e51ee0ffaa2a0f302775cf5">NwNotifyType</a> { <br/>
&#160;&#160;<b>NW_NONE</b>, 
<b>NW_CONNINFO</b>, 
<b>NW_CONNECT</b>, 
<b>NW_DISCONNECT</b>, 
<br/>
&#160;&#160;<b>NW_LOGIN</b>, 
<b>NW_LOGOUT</b>, 
<b>NW_USERNAME</b>, 
<b>NW_PASSWORD</b>, 
<br/>
&#160;&#160;<b>NW_ULIST_START</b>, 
<b>NW_ULIST_NAME</b>, 
<b>NW_ULIST_TOPIC</b>, 
<b>NW_ULIST_APPEND</b>, 
<br/>
&#160;&#160;<b>NW_ULIST_REMOVE</b>, 
<b>NW_ULIST_END</b>, 
<b>NW_PRIVMSG</b>, 
<b>NW_CHATMSG</b>, 
<br/>
&#160;&#160;<b>NW_DATA</b>
<br/>
 }</td></tr>
<tr class="memdesc:a7c7ec5e51e51ee0ffaa2a0f302775cf5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Event and Action notification types.  <a href="network_8h.html#a7c7ec5e51e51ee0ffaa2a0f302775cf5">More...</a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a8e44e0a5227bd18647d028aa9c3b91f8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e44e0a5227bd18647d028aa9c3b91f8"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><b>NwNotifyType_Debug</b> (<a class="el" href="network_8h.html#a7c7ec5e51e51ee0ffaa2a0f302775cf5">NwNotifyType</a> t)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Provides a base for an Instant Messaging network implementation. </p>
<p>This library provides easy to use connection support (NwConnection), a basic model for implementing Instant Messaging networks (NwNetwork) and intercomponent messaging support through use of event and action message (NwNotify) queues. </p>
<dl class="section author"><dt>Author:</dt><dd>crashenator (crashenator -at- gmail.com) </dd></dl>
</div><hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="a693b956d9a9c59c9f23203ab93478556"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="network_8h.html#a693b956d9a9c59c9f23203ab93478556">NwCheckType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Name type distinctions. </p>
<p>States specifying the type of Name string for distinction of Username/Channel/Reserved names.<br/>
 These describe <em>what</em> a name (origin, destination) in a message/event actually <em>is</em>.<br/>
 These are used to communicate meaning both internally and when messages are read outside of their Network class as well as serving as Return Values for validation functions. (NwNetwork::CheckOrigin())</p>
<p>Example: If an instant message is sent to "X", X could be a chatroom (send chat post), a username (send IM), your username (relay back), a reserved username (relay program options), or invalid (do nothing/error).<br/>
 These states allow conditional code like this which is especially useful when the <code>Name</code> changes depending on program/component context so that meaning won't be lost. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a693b956d9a9c59c9f23203ab93478556a1a5c92a9cdd9fabd3505568920f2bc9e"></a>NW_CHECK_INVALID</em>&nbsp;</td><td>
<p>not used, invalid name state (0) </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a693b956d9a9c59c9f23203ab93478556a236ec7be6febe786f13e278984b95bd3"></a>NW_CHECK_UNKNOWN</em>&nbsp;</td><td>
<p>the Name </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a693b956d9a9c59c9f23203ab93478556adae6e70f769dbce219c33c3bf2c60aa6"></a>NW_CHECK_USERNAME</em>&nbsp;</td><td>
<p>the Name is the current Network Username </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a693b956d9a9c59c9f23203ab93478556ad90a2ad51fd295e1b9d4372efef45fe3"></a>NW_CHECK_CHANNEL</em>&nbsp;</td><td>
<p>the Name is the current Network <a class="el" href="class_channel.html" title="A channel/chatroom class.">Channel</a> </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a693b956d9a9c59c9f23203ab93478556a849f204369f6d309d9cf201425c56d8b"></a>NW_CHECK_CHANNEL_UNKNOWN</em>&nbsp;</td><td>
<p>the Name is a channel </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a693b956d9a9c59c9f23203ab93478556a609d10ec9777a187f6e02f29b4afca54"></a>NW_CHECK_RESERVED</em>&nbsp;</td><td>
<p>the Name is the Reserved Username (NW_RESERVED_USERNAME) </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a693b956d9a9c59c9f23203ab93478556a553f532188659511feaabf871114d04d"></a>NW_CHECK_BLANK</em>&nbsp;</td><td>
<p>the Name is blank (easy enough to check) </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="a7c7ec5e51e51ee0ffaa2a0f302775cf5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="network_8h.html#a7c7ec5e51e51ee0ffaa2a0f302775cf5">NwNotifyType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Event and Action notification types. </p>
<p>These types are an abstraction of common Instant-Messaging network abilities Allowing Network implementations to notify the program of Events and Perform actions using these like-terms allows easier design, portability, reuse and even intercommunication. </p>

</div>
</div>
<a class="anchor" id="a279ec4e071bf0348bb79fefdc92d47ac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="network_8h.html#a279ec4e071bf0348bb79fefdc92d47ac">NwStepState</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Program states for use with NwNetwork::step() </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a279ec4e071bf0348bb79fefdc92d47aca559488ca041de038e4ee3d9ea163193a"></a>NW_STEP</em>&nbsp;</td><td>
<p>Indicates program loop iteration. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a279ec4e071bf0348bb79fefdc92d47aca663f9d86c7a32ab331d23777358923c7"></a>NW_STEP_BEGIN</em>&nbsp;</td><td>
<p>Indicates program/networking startup. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a279ec4e071bf0348bb79fefdc92d47acaa936952f0b9fab13f9d070774f2fff3e"></a>NW_STEP_END</em>&nbsp;</td><td>
<p>Indicates program/networking shutdown. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="network_8h.html">network.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1 </li>
  </ul>
</div>
</body>
</html>
